package com.xuan.api;

import com.xuan.model.entity.User;
import com.xuan.model.respons.ResultBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

public interface UserRemoteApi {
    @GetMapping("/register/chekUsername/{username}")
    public ResultBody chekUsername(@PathVariable("username") String username);

    @PostMapping("/register/savaUser")
    public ResultBody savaUser(@RequestBody User user);

    @GetMapping("/getAll")
    ResultBody getAll();

    @GetMapping("/deleteByUsername/{username}")
    ResultBody deleteByUsername(@PathVariable("username") String username);

    @GetMapping("/chekMobile/{mobile}")
    boolean chekMobile(@PathVariable("mobile") String mobile);

    @PostMapping("/resetPassword")
    ResultBody resetPassword(@RequestBody User user);
}
